Add reftest to test border-style: none
authorAlexander Larsson <alexl@redhat.com>
Thu, 24 Nov 2011 17:25:08 +0000 (18:25 +0100)
committerAlexander Larsson <alexl@redhat.com>
Fri, 25 Nov 2011 15:14:10 +0000 (16:14 +0100)
From the css docs at http://www.w3.org/TR/CSS2/box.html:

8.5.1 Border width: 'border-top-width', 'border-right-width', 'border-bottom-width',
'border-left-width', and 'border-width'

Computed value:   absolute length; '0' if the border style is 'none' or 'hidden'

So, if i specify border-style none and a border-width > 0 that should give the
same result as border-width 0.

tests/reftests/Makefile.am
tests/reftests/border-style-none.css [new file with mode: 0644]
tests/reftests/border-style-none.ref.ui [new file with mode: 0644]
tests/reftests/border-style-none.ui [new file with mode: 0644]

index 844643a4914b3fd45be7510166e811f1edd9aae9..b3ffb1e78446a8ba9c19fae0d6daca52a95f6a3e 100644 (file)
@@ -57,6 +57,9 @@ EXTRA_DIST += \
        border-radius-clamp.css\
        border-radius-clamp.ref.ui \
        border-radius-clamp.ui \
+       border-style-none.css \
+       border-style-none.ref.ui \
+       border-style-none.ui \
        box-packing.css \
        box-packing.ref.ui \
        box-packing.ui \
diff --git a/tests/reftests/border-style-none.css b/tests/reftests/border-style-none.css
new file mode 100644 (file)
index 0000000..0c3bde8
--- /dev/null
@@ -0,0 +1,19 @@
+* {
+  border-color: red;
+  border-image: none;
+  background-image: none;
+}
+
+GtkButton {
+  background-color: purple;
+  border-style: none;
+  border-width: 5;
+  border-radius: 15;
+}
+
+#reference {
+  border-style: solid;
+  border-width: 0;
+  border-radius: 15;
+}
+
diff --git a/tests/reftests/border-style-none.ref.ui b/tests/reftests/border-style-none.ref.ui
new file mode 100644 (file)
index 0000000..2fce514
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkButton" id="button1">
+        <property name="name">reference</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">True</property>
+        <property name="use_action_appearance">False</property>
+       <property name="width_request">144</property>
+        <property name="height_request">144</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/border-style-none.ui b/tests/reftests/border-style-none.ui
new file mode 100644 (file)
index 0000000..7b3abc5
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkButton" id="button1">
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">True</property>
+        <property name="use_action_appearance">False</property>
+       <property name="width_request">144</property>
+        <property name="height_request">144</property>
+      </object>
+    </child>
+  </object>
+</interface>